<template>
  <div>
    <el-upload
      class="avatar-uploader"
      :http-request="handleImport"
      :show-file-list="false"
    >
      <el-icon class="avatar-uploader-icon"><Plus /></el-icon>
    </el-upload>
    <div ref="cont"></div>
  </div>
</template>

<script setup lang="ts">
import { UploadRequestOptions } from "element-plus";
import { ref } from "vue";
// @ts-ignore
import { excelImport } from "../../utils/excel-sdk.js";
const cont = ref<HTMLDivElement | null>(null);
const handleImport = (info: UploadRequestOptions) => {
  console.log(info);
  excelImport(info.file, cont.value);
};
</script>

<style scoped></style>
